{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox-title">
        <h5>编辑</h5>
    </div>
    <div class="ibox-content layui-form">
        <div class="layui-row layui-col-space10 layui-form-item ">
            <input type="hidden" name="mp_id" value="{$info.mp_id}">
            <input type="hidden" name="mp_phone" value="{$info.mp_phone}">

            <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                <label class="layui-form-label">价格：</label>
                <div class="layui-input-block">
                    <input type="text" name="mp_price" lay-verify="required" placeholder="请输入价格" class="layui-input " value="{$info.mp_price}">
                </div>
            </div>

            <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                <label class="layui-form-label">原价：</label>
                <div class="layui-input-block">
                    <input type="text" name="mp_big_money" lay-verify="required" placeholder="请输入原价" class="layui-input " value="{$info.mp_big_money}">
                </div>
            </div>

            {if $info.mp_phone==2}
            <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                <label class="layui-form-label">ios支付ID：</label>
                <div class="layui-input-block">
                    <input type="text" name="mp_ios_id" lay-verify="required" placeholder="请输入支付ID" class="layui-input " value="{$info.mp_ios_id}">
                </div>
            </div>
            {/if}

            <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="component-form-element">确定
                    </button>
                    <button class="layui-btn layui-btn-primary" onclick="history.go(-1)">返回</button>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
    layui.use(['form'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('memberPriceEdit')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        wk.success(res.msg,"{:url('Membership/memberPrice')}")
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
    });
</script>
</body>
</html>